package cn.accjiyun.gomoku.util;

import java.text.SimpleDateFormat;

/**
 * Created by jiyun on 2016/9/12.
 */
public class Logger {

    public static void Log(String tag, String log) {
        SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS");
        String date = sDateFormat.format(new java.util.Date());
        System.out.println("<" + date + "> " + tag + ": " + log);
    }

    public static void exceptionLog(String log, Exception e) {
        SimpleDateFormat sDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss SSS");
        String date = sDateFormat.format(new java.util.Date());
        System.out.println("<" + date + ">" + log);
        System.out.println("\t" + e.getMessage());
    }
}
